package main

import (
	"fmt"
	"luntan/pkg/config"
	"luntan/pkg/database"
	"luntan/pkg/handlers"
	"net/http"

	"github.com/spf13/viper"
)

func main() {
	config.LoadConfig()
	database.Init()
	handlers.Init()

	port := viper.GetString("server.port")
	err := http.ListenAndServe(port, nil)
	if err != nil {
		fmt.Println(err.Error())
	}
}
